package EveryDayPractice;

import java.util.Scanner;

public class Practice05 {
        public static void main(String[] args) {
            Scanner sc = new Scanner(System.in);
            int n = sc.nextInt();
            char A='A';
            char B='B';
            char C='C';
          System.out.println((n>=990)?A:(n>60)?B:C);
        }
}
